<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="/styles/jquery-ui.css" >
<link rel="stylesheet" href="/styles/blueimp-gallery.css">
    <script type="text/javascript">
        localPath="page"
    </script>
</head>
<body>
<div class="p-h-md p-v bg-white box-shadow pos-rlt">
  <h3 class="no-margin have-btn-title">新建表单</h3>
</div>
<div class="p-md">
  <input id="mainDomain" type="hidden" value="${mainDomain}"/>
  <iframe id="iframeB"  name="iframeB" src="http://${diyFormDomain}/zen/front/${memberId}/forms/${formId}/edit" width="100%" height="auto" scrolling="yes" frameborder="0"></iframe>
</div>
<div class="toolbar">
    <div class="btn-group">
      <div id="saveData" class="btn btn-primary">生成</div>
      <div id="backList" class="btn btn-primary">返回</div>
    </div>
</div>
<script type="text/javascript">
    document.domain=$("#mainDomain").val();

    var h = $(window).height();
    var w = $(window).width();
    var headerh = $('#header').outerHeight(true);
    var titleh = $('#header').outerHeight(true);
    var toolbarh = $('.toolbar').outerHeight(true);
    var footerh = $('#footer').outerHeight(true);
    var endH = h-(headerh+titleh+toolbarh+footerh+70);
    
    function setHeight(h) {
        $('#iframeB').css('height',endH+'px');
    }
    $(function () {
        //生成
        $("#saveData").click(function(){
            var vue=document.getElementById("iframeB").contentWindow.MainFormBuilder;
            vue.saveData();
            console.log(vue)
            // var submitBtn = doc.find('.submit-btn').html();
            //console.log(submitBtn)
        })
        //返回
        $("#backList").click(function(){
            var vue=document.getElementById("iframeB").contentWindow.MainFormBuilder;
            vue.backList();
        })


    });
</script>
</body>
</html>